<%@ page language="java" import="java.util.*,org.model.ArtAndProClass,org.model.Article" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
//pageArticles
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>大家好我是拷贝忍者！Mir.刘</title>
		<link rel="stylesheet" href="css/all.css" type="text/css" media="screen">
		<link rel="stylesheet" href="css/style.css" type="text/css" media="screen">
		<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
		<script type="text/javascript" src="js/jquery-1.12.3.min.js"></script>
	</head>
	<body class="index" style="zoom: 1;">
		<div style="position:relative;width:70%;left:15%">
			<%@ include file="head.jsp"%>
			<div class="page-wrapper">
				<div class="page-content">
					<ul class="breadcrumb">
						<li><span class="breadcrumb-title">当前位置：</span><a href="Home.action">首页</a>
						</li>
						<%
							ArrayList<ArtAndProClass> loc=new ArrayList<ArtAndProClass>();
							ArtAndProClass is=(ArtAndProClass)request.getAttribute("ArticleClass");
							while(is.getFatherClass()!=null){
								loc.add(is);
								is=is.getFatherClass();
							}
							//添加顶级class
							loc.add(is);
							for(int i=loc.size()-1;i>=0;i--){
						%>
									<li><a href="articleClass.action?classId=<%=loc.get(i).getClassId() %>"><%=loc.get(i).getClassName() %></a></li>
						<%
							}
						%>
					</ul>
					<div class="row">
						<div class="col-md-9 col-main">
							<div class="list list-condensed">
								<header>
									<h2>${ArticleClass.className }</h2></header>
								<section class="items items-hover">
									<c:forEach items="${pageArticles }" var="is">
										<div class="item">
											<div class="item-heading">
												<div class="text-muted pull-right">
													<span title="阅读"><i class="icon-eye-open"></i> ${is.click }</span> &nbsp;
													<span title="发布时间"><i class="icon-time"></i> ${is.createTime }</span>
												</div>
												<h4><a href="articleDetail.action?articleId=${is.articleId }">${is.articleTitle }</a></h4>
											</div>
										</div>
									</c:forEach>
								</section>
								<footer class="clearfix">
									<div style="float:right; clear:none;" class="pager">
										${page }/${pageCount } 
										<c:if test="${page>1 }">
											<a href="articleClass.action?classId=${ArticleClass.classId }">
												<i class="icon-step-backward" title="首页"></i> 
											</a>
										</c:if>
										<c:if test="${page==1}">
											<i class="icon-step-backward" title="首页"></i> 
										</c:if>
										<c:if test="${page>1 }">
											<a href="articleClass.action?classId=${ArticleClass.classId }&page=${page-1}">
												<i class="icon-play icon-rotate-180" title="上一页"></i> 
											</a>
										</c:if>
										<c:if test="${!(page>1) }">
											<i class="icon-play icon-rotate-180" title="上一页"></i> 
										</c:if>
										<c:if test="${page<pageCount }">
											<a href="articleClass.action?classId=${ArticleClass.classId }&page=${page+1}">
												<i class="icon-play" title="下一页"></i> 
											</a>
										</c:if>
										<c:if test="${page==pageCount }">
											<i class="icon-play" title="下一页"></i> 
										</c:if>
										<c:if test="${page<pageCount }">
											<a href="articleClass.action?classId=${ArticleClass.classId }&page=${pageCount}">
												<i class="icon-step-forward" title="末页"></i> 
											</a>
										</c:if>
										<c:if test="${page==pageCount }">
											<i class="icon-step-forward" title="末页"></i> 
										</c:if>
									</div>
								</footer>
							</div>
						</div>
						<div class="col-md-3 col-side">
							<side class="page-side">
								<div id="block6" class="panel panel-block ">
									<div class="panel-heading">
										<strong><i class="icon-folder-close"></i> 文章分类</strong>
									</div>
									<div class="panel-body">
										<ul class="nav nav-secondary nav-stacked">
										<c:forEach items="${requestScope.menu }" var="ismenu">
											<c:if test="${ismenu.classMap.equals('article') }">
											<li>
												<a href="<c:if test="${ismenu.getArt_ProExistBoolean() }">
														${ismenu.classMap }Detail.action?articleId=${ismenu.getArt_ProId() }
													</c:if>
													<c:if test="${!ismenu.getArt_ProExistBoolean() }">
														${ismenu.classMap }Class.action?classId=${ismenu.classId }
													</c:if>"><i class="icon-folder-close-alt ">&nbsp ${ismenu.className }</i>
												</a>
											</li>
											</c:if>
										</c:forEach>
										</ul>
									</div>
								</div>
								<style>
									#block6{}#block6 .panel-heading{}
								</style>
								<style>
									#block9{}#block9 .panel-heading{}
								</style>
							</side>
						</div>
					</div>
					<div class="row all-bottom">
						<div class="col-md-12"></div>
					</div>
				</div>
			</div>
			<%@ include file="foot.jsp"%>
		</div>
	</body>
</html>